DROP TABLE CRST_PO_LINE_LOCATIONS_ALL;

CREATE TABLE CRST_PO_LINE_LOCATIONS_ALL
(
  LINE_LOCATION_ID                NUMBER        NOT NULL,
  LAST_UPDATE_DATE                DATE          NOT NULL,
  LAST_UPDATED_BY                 NUMBER        NOT NULL,
  PO_HEADER_ID                    NUMBER        NOT NULL,
  PO_LINE_ID                      NUMBER        NOT NULL,
  LAST_UPDATE_LOGIN               NUMBER,
  CREATION_DATE                   DATE,
  CREATED_BY                      NUMBER,
  QUANTITY                        NUMBER,
  QUANTITY_RECEIVED               NUMBER,
  QUANTITY_ACCEPTED               NUMBER,
  QUANTITY_REJECTED               NUMBER,
  QUANTITY_BILLED                 NUMBER,
  QUANTITY_CANCELLED              NUMBER,
  UNIT_MEAS_LOOKUP_CODE           VARCHAR2(25 BYTE),
  PO_RELEASE_ID                   NUMBER,
  SHIP_TO_LOCATION_ID             NUMBER,
  SHIP_VIA_LOOKUP_CODE            VARCHAR2(25 BYTE),
  NEED_BY_DATE                    DATE,
  PROMISED_DATE                   DATE,
  LAST_ACCEPT_DATE                DATE,
  PRICE_OVERRIDE                  NUMBER,
  ENCUMBERED_FLAG                 VARCHAR2(1 BYTE),
  ENCUMBERED_DATE                 DATE,
  UNENCUMBERED_QUANTITY           NUMBER,
  FOB_LOOKUP_CODE                 VARCHAR2(25 BYTE),
  FREIGHT_TERMS_LOOKUP_CODE       VARCHAR2(25 BYTE),
  TAXABLE_FLAG                    VARCHAR2(1 BYTE),
  TAX_NAME                        VARCHAR2(15 BYTE),
  ESTIMATED_TAX_AMOUNT            NUMBER,
  FROM_HEADER_ID                  NUMBER,
  FROM_LINE_ID                    NUMBER,
  FROM_LINE_LOCATION_ID           NUMBER,
  START_DATE                      DATE,
  END_DATE                        DATE,
  LEAD_TIME                       NUMBER,
  LEAD_TIME_UNIT                  VARCHAR2(25 BYTE),
  PRICE_DISCOUNT                  NUMBER,
  TERMS_ID                        NUMBER,
  APPROVED_FLAG                   VARCHAR2(1 BYTE),
  APPROVED_DATE                   DATE,
  CLOSED_FLAG                     VARCHAR2(1 BYTE),
  CANCEL_FLAG                     VARCHAR2(1 BYTE),
  CANCELLED_BY                    NUMBER(9),
  CANCEL_DATE                     DATE,
  CANCEL_REASON                   VARCHAR2(240 BYTE),
  FIRM_STATUS_LOOKUP_CODE         VARCHAR2(25 BYTE),
  FIRM_DATE                       DATE,
  ATTRIBUTE_CATEGORY              VARCHAR2(30 BYTE),
  ATTRIBUTE1                      VARCHAR2(150 BYTE),
  ATTRIBUTE2                      VARCHAR2(150 BYTE),
  ATTRIBUTE3                      VARCHAR2(150 BYTE),
  ATTRIBUTE4                      VARCHAR2(150 BYTE),
  ATTRIBUTE5                      VARCHAR2(150 BYTE),
  ATTRIBUTE6                      VARCHAR2(150 BYTE),
  ATTRIBUTE7                      VARCHAR2(150 BYTE),
  ATTRIBUTE8                      VARCHAR2(150 BYTE),
  ATTRIBUTE9                      VARCHAR2(150 BYTE),
  ATTRIBUTE10                     VARCHAR2(150 BYTE),
  UNIT_OF_MEASURE_CLASS           VARCHAR2(25 BYTE),
  ENCUMBER_NOW                    VARCHAR2(1 BYTE),
  ATTRIBUTE11                     VARCHAR2(150 BYTE),
  ATTRIBUTE12                     VARCHAR2(150 BYTE),
  ATTRIBUTE13                     VARCHAR2(150 BYTE),
  ATTRIBUTE14                     VARCHAR2(150 BYTE),
  ATTRIBUTE15                     VARCHAR2(150 BYTE),
  INSPECTION_REQUIRED_FLAG        VARCHAR2(1 BYTE),
  RECEIPT_REQUIRED_FLAG           VARCHAR2(1 BYTE),
  QTY_RCV_TOLERANCE               NUMBER,
  QTY_RCV_EXCEPTION_CODE          VARCHAR2(25 BYTE),
  ENFORCE_SHIP_TO_LOCATION_CODE   VARCHAR2(25 BYTE),
  ALLOW_SUBSTITUTE_RECEIPTS_FLAG  VARCHAR2(1 BYTE),
  DAYS_EARLY_RECEIPT_ALLOWED      NUMBER,
  DAYS_LATE_RECEIPT_ALLOWED       NUMBER,
  RECEIPT_DAYS_EXCEPTION_CODE     VARCHAR2(25 BYTE),
  INVOICE_CLOSE_TOLERANCE         NUMBER,
  RECEIVE_CLOSE_TOLERANCE         NUMBER,
  SHIP_TO_ORGANIZATION_ID         NUMBER,
  SHIPMENT_NUM                    NUMBER,
  SOURCE_SHIPMENT_ID              NUMBER,
  SHIPMENT_TYPE                   VARCHAR2(25 BYTE) NOT NULL,
  CLOSED_CODE                     VARCHAR2(30 BYTE),
  REQUEST_ID                      NUMBER,
  PROGRAM_APPLICATION_ID          NUMBER,
  PROGRAM_ID                      NUMBER,
  PROGRAM_UPDATE_DATE             DATE,
  USSGL_TRANSACTION_CODE          VARCHAR2(30 BYTE),
  GOVERNMENT_CONTEXT              VARCHAR2(30 BYTE),
  RECEIVING_ROUTING_ID            NUMBER,
  ACCRUE_ON_RECEIPT_FLAG          VARCHAR2(1 BYTE),
  CLOSED_REASON                   VARCHAR2(240 BYTE),
  CLOSED_DATE                     DATE,
  CLOSED_BY                       NUMBER(9),
  ORG_ID                          NUMBER,
  QUANTITY_SHIPPED                NUMBER,
  GLOBAL_ATTRIBUTE_CATEGORY       VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE1               VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE2               VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE3               VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE4               VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE5               VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE6               VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE7               VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE8               VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE9               VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE10              VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE11              VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE12              VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE13              VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE14              VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE15              VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE16              VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE17              VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE18              VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE19              VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE20              VARCHAR2(150 BYTE),
  COUNTRY_OF_ORIGIN_CODE          VARCHAR2(2 BYTE),
  TAX_USER_OVERRIDE_FLAG          VARCHAR2(1 BYTE),
  MATCH_OPTION                    VARCHAR2(25 BYTE),
  TAX_CODE_ID                     NUMBER,
  CALCULATE_TAX_FLAG              VARCHAR2(1 BYTE),
  CHANGE_PROMISED_DATE_REASON     VARCHAR2(240 BYTE),
  NOTE_TO_RECEIVER                VARCHAR2(480 BYTE),
  SECONDARY_QUANTITY              NUMBER,
  SECONDARY_UNIT_OF_MEASURE       VARCHAR2(25 BYTE),
  PREFERRED_GRADE                 VARCHAR2(25 BYTE),
  SECONDARY_QUANTITY_RECEIVED     NUMBER,
  SECONDARY_QUANTITY_ACCEPTED     NUMBER,
  SECONDARY_QUANTITY_REJECTED     NUMBER,
  SECONDARY_QUANTITY_CANCELLED    NUMBER,
  VMI_FLAG                        VARCHAR2(1 BYTE),
  CONSIGNED_FLAG                  VARCHAR2(1 BYTE),
  RETROACTIVE_DATE                DATE,
  SUPPLIER_ORDER_LINE_NUMBER      VARCHAR2(25 BYTE),
  LINE_LOCATION_ID_N              NUMBER
);
